package org.liveboardgames.agricola.control
{
    import com.adobe.cairngorm.control.FrontController;
    
    import org.liveboardgames.agricola.control.commands.ActionCompleteCommand;
    import org.liveboardgames.agricola.control.commands.AddFarmElementCommand;
    import org.liveboardgames.agricola.control.commands.AddResourceCommand;
    import org.liveboardgames.agricola.control.commands.BakeCommand;
    import org.liveboardgames.agricola.control.commands.BuildImprovementCommand;
    import org.liveboardgames.agricola.control.commands.BuildPastureCommand;
    import org.liveboardgames.agricola.control.commands.BuildRoomCommand;
    import org.liveboardgames.agricola.control.commands.BuildStableCommand;
    import org.liveboardgames.agricola.control.commands.CreateGameCommand;
    import org.liveboardgames.agricola.control.commands.DropPeepCommand;
    import org.liveboardgames.agricola.control.commands.EmptyCardCommand;
    import org.liveboardgames.agricola.control.commands.EndTurnCommand;
    import org.liveboardgames.agricola.control.commands.HarvestFeedCommand;
    import org.liveboardgames.agricola.control.commands.HarvestFieldCommand;
    import org.liveboardgames.agricola.control.commands.HarvestStepCompleteCommand;
    import org.liveboardgames.agricola.control.commands.LoadGameCommand;
    import org.liveboardgames.agricola.control.commands.PerformActionCommand;
    import org.liveboardgames.agricola.control.commands.PlayMultipleCardCommand;
    import org.liveboardgames.agricola.control.commands.RemoveResourceCommand;
    import org.liveboardgames.agricola.control.commands.ResetHarvestCommand;
    import org.liveboardgames.agricola.control.commands.SowCommand;
    import org.liveboardgames.agricola.control.commands.StartHarvestCommand;
    import org.liveboardgames.agricola.control.commands.StartRoundCommand;
    import org.liveboardgames.agricola.control.events.ActionCompleteEvent;
    import org.liveboardgames.agricola.control.events.AddFarmElementEvent;
    import org.liveboardgames.agricola.control.events.AddResourceEvent;
    import org.liveboardgames.agricola.control.events.BakeEvent;
    import org.liveboardgames.agricola.control.events.BuildImprovementEvent;
    import org.liveboardgames.agricola.control.events.BuildPastureEvent;
    import org.liveboardgames.agricola.control.events.BuildRoomEvent;
    import org.liveboardgames.agricola.control.events.BuildStableEvent;
    import org.liveboardgames.agricola.control.events.CreateGameEvent;
    import org.liveboardgames.agricola.control.events.DropPeepEvent;
    import org.liveboardgames.agricola.control.events.EmptyCardEvent;
    import org.liveboardgames.agricola.control.events.EndTurnEvent;
    import org.liveboardgames.agricola.control.events.HarvestFeedEvent;
    import org.liveboardgames.agricola.control.events.HarvestFieldEvent;
    import org.liveboardgames.agricola.control.events.HarvestStepCompleteEvent;
    import org.liveboardgames.agricola.control.events.LoadGameEvent;
    import org.liveboardgames.agricola.control.events.PerformActionEvent;
    import org.liveboardgames.agricola.control.events.PlayMultipleCardEvent;
    import org.liveboardgames.agricola.control.events.RemoveResourceEvent;
    import org.liveboardgames.agricola.control.events.ResetHarvestEvent;
    import org.liveboardgames.agricola.control.events.SowEvent;
    import org.liveboardgames.agricola.control.events.StartHarvestEvent;
    import org.liveboardgames.agricola.control.events.StartRoundEvent;
    
    public class AgricolaController extends FrontController
    {
        public function AgricolaController()
        {
            initializeCommands();
        }
        
        private function initializeCommands():void
        {
            addCommand(CreateGameEvent.CREATE_GAME, CreateGameCommand);
            addCommand(LoadGameEvent.LOAD_GAME, LoadGameCommand);
            addCommand(StartRoundEvent.START_ROUND, StartRoundCommand);
            addCommand(PerformActionEvent.PERFORM_ACTION, PerformActionCommand);
            addCommand(DropPeepEvent.DROP_PEEP, DropPeepCommand);
            addCommand(EndTurnEvent.END_TURN, EndTurnCommand);
            addCommand(ActionCompleteEvent.ACTION_COMPLETE, ActionCompleteCommand);
            addCommand(AddResourceEvent.ADD_RESOURCE, AddResourceCommand);
            addCommand(RemoveResourceEvent.REMOVE_RESOURCE, RemoveResourceCommand);
            addCommand(BuildRoomEvent.BUILD_ROOM, BuildRoomCommand);
            addCommand(BuildStableEvent.BUILD_STABLE, BuildStableCommand);
            addCommand(BuildImprovementEvent.IMPROVEMENT_CONSTRUCTION, BuildImprovementCommand);
            addCommand(BakeEvent.BAKE, BakeCommand);
            addCommand(SowEvent.SOW, SowCommand);
            addCommand(BuildPastureEvent.BUILD_PASTURE, BuildPastureCommand);
            addCommand(StartHarvestEvent.START_HARVEST, StartHarvestCommand);
            addCommand(HarvestFieldEvent.HARVEST_FIELD, HarvestFieldCommand);
            addCommand(HarvestStepCompleteEvent.HARVEST_STEP_COMPLETE, HarvestStepCompleteCommand);
            addCommand(PlayMultipleCardEvent.PLAY_MULTIPLE_CARD, PlayMultipleCardCommand);
            addCommand(HarvestFeedEvent.HARVEST_FEED, HarvestFeedCommand);
            addCommand(AddFarmElementEvent.ADD_FARM_ELEMENT, AddFarmElementCommand);
            addCommand(EmptyCardEvent.EMPTY_CARD, EmptyCardCommand);
            addCommand(ResetHarvestEvent.RESET_HARVEST, ResetHarvestCommand);
        }
    }
}